<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var name = prompt("请输入美国总统的名字", "唐纳德.特朗普");
        document.write("姓名：" + name + "<br>");
        var age = prompt("请输入美国总统的年龄", "71");
        document.write("年龄：" + age + "<br>");
    </script>
</body>

</html>